import request from '@/utils/request';

// 轮播图
export function carouselChartList(data) {
    return request({
        url: '/business/carousel_chart/list',
        method: 'GET',
        data
    })
}
// 公告
export function noticeList(data) {
    return request({
        url: '/system/notice/list',
        method: 'GET',
        data
    })
}
// 查询参数配置项
export function configList(data) {
    return request({
        url: '/system/config/list',
        method: 'GET',
        data
    })
}
// 查询富文本
export function rich_text_config(key) {
    return request({
        url: '/business/rich_text_config/' + key,
        method: 'GET',
    })
}
export function getOpenIdByCode(data) {
    return request({
        url: '/business/residents/wx/getOpenIdByCode',
        method: 'GET',
        data
    })
}
export function getPhoneNumber(data) {
    return request({
        url: '/business/residents/wx/getPhoneNumber',
        method: 'post',
        data
    })
}
export function wxLogin(data) {
    return request({
        url: '/business/residents/wx/login?openid=uherugheriuhgihifgheg',
        method: 'post',
        data
    })
}
export function userInfo() {
    return request({
        url: '/business/residents/userInfo',
        method: 'post',
    })
}
export function addressList(data) {
    return request({
        url: '/business/address/list',
        method: 'get',
        data
    })
}
export function addAddress(data) {
    return request({
        url: '/business/address',
        method: 'post',
        data
    })
}
export function updataAddress(data) {
    return request({
        url: '/business/address',
        method: 'put',
        data
    })
}
export function infoAddress(id) {
    return request({
        url: '/business/address/' + id,
        method: 'get',
    })
}
export function delAddress(ids) {
    return request({
        url: '/business/address/' + ids,
        method: 'delete',
    })
}

export function appointmentDate() {
    return request({
        url: '/business/residents/appointmentDate',
        method: 'post',
    })
}

export function getDict(dict) {
    return request({
        url: '/system/dict/data/type/' + dict,
        method: 'get',
    })
}
export function getEstimatedPrice(data) {
    return request({
        url: '/business/residents/getEstimatedPrice',
        method: 'post',
        data
    })
}
export function homeRecycling(data) {
    return request({
        url: '/business/residents/homeRecycling',
        method: 'post',
        data
    })
}
export function myDealList(data) {
    return request({
        url: '/business/residents/myDealList',
        method: 'get',
        data
    })
}
export function applyToRecycler(data) {
    return request({
        url: '/business/residents/applyToRecycler',
        method: 'post',
        data
    })
}
export function transactionInfo(id) {
    return request({
        url: '/business/transaction_order/' + id,
        method: 'get',
    })
}
export function exchangeOrderStatus(data) {
    return request({
        url: '/business/transaction_order/exchangeOrderStatus',
        method: 'get',
        data
    })
}
export function rejectOrder(id) {
    return request({
        url: '/business/transaction_order/exchangeOrderStatus/' + id,
        method: 'get',
    })
}
export function reAppointment(data) {
    return request({
        url: '/business/transaction_order',
        method: 'post',
        data
    })
}
export function feedback(data) {
    return request({
        url: '/business/feedback',
        method: 'post',
        data
    })
}
export function infoNotice(id) {
    return request({
        url: '/system/notice/' + id,
        method: 'get',
    })
}
export function fixedPointTradingList(data) {
    return request({
        url: '/business/detail_fixed_point_trading/list',
        method: 'get',
        data
    })
}
export function receiptList(data) {
    return request({
        url: '/business/receipt_list/list',
        method: 'get',
        data
    })
}
export function receiptInfo(id) {
    return request({
        url: '/business/receipt_list/' + id,
        method: 'get',
    })
}
export function recycleBinList(data) {
    return request({
        url: '/business/residents/recycleBinList',
        method: 'get',
        data
    })
}
export function recycleBinDetail(siteId) {
    return request({
        url: '/business/residents/recycleBinDetail/' + siteId,
        method: 'get',
    })
}
export function incomeExpenditureList(data) {
    return request({
        url: '/business/residents/incomeExpenditureList',
        method: 'get',
        data
    })
}
export function confirmTransaction(data) {
    return request({
        url: '/business/residents/confirmTransaction',
        method: 'post',
        data
    })
}
export function confirmDeal(data) {
    return request({
        url: '/business/residents/confirmDeal',
        method: 'get',
        data
    })
}

export function cancelDeal(data) {
    return request({
        url: '/business/residents/cancelDeal',
        method: 'get',
        data
    })
}
export function cancelOrder(data) {
    return request({
        url: '/business/residents/cancelOrder',
        method: 'post',
        data
    })
}

// 签约信息 
export function signDetails(data) {
    return request({
        url: '/business/residents/signDetails',
        method: 'get',
        data
    })
}
// 资质详情 
export function app_qualifications(data) {
    return request({
        url: '/system/config/configKey/app_qualifications',
        method: 'get',
        data
    })
}
// 申请签约
export function applySign(data) {
    return request({
        url: '/business/residents/applySign',
        method: 'post',
        data
    })
}
// 油品列表 oilList
export function oilList(data) {
    return request({
        url: '/business/residents/oilList',
        method: 'get',
        data
    })
}
// 收油 一键申请  /business/residents/oilReceiptApplication
export function oilReceiptApplication(data) {
    return request({
        url: '/business/residents/oilReceiptApplication',
        method: 'post',
        data
    })
}
// 清掏 一键申请  /business/residents/clearApplication
export function clearApplication(data) {
    return request({
        url: '/business/residents/clearApplication',
        method: 'post',
        data
    })
}
// 消息列表 recipientId 传id
export function messageList(data) {
    return request({
        url: '/business/message/list',
        method: 'get',
        data
    })
}
// 消息详情 /business/message/{id}
export function messageDetails(id) {
    return request({
        url: `/business/message/${id}`,
        method: 'get',
    })
}
// 消息是否已读  memo 1已读  0未读
export function messageMemo(data) {
    return request({
        url: `/business/message`,
        method: 'put',
        data: data
    })
}
// 获取授权人列表
export function getAuthorizerList(data) {
    return request({
        url: '/business/residents/getAuthorizerList',
        method: 'post',
        data
    })
}
// 添加授权人 
export function addAuthorizer(data) {
    return request({
        url: '/business/residents/addAuthorizer',
        method: 'post',
        data
    })
}
// 授权人删除
export function delAuthorizer(id) {
    return request({
        url: '/business/residents/delAuthorizer/' + id,
        method: 'post',
    })
}
// 油脂收运记录
export function receiptShipmentRecords(data) {
    return request({
        url: '/business/residents/receiptShipmentRecords',
        method: 'get',
        data
    })
}
// 油脂收运记录  取消申请
export function cancelApplication(id) {
    return request({
        url: '/business/residents/cancelApplication/' + id,
        method: 'post',
    })
}
// 油脂收运记录  详情
export function receiptShipmentRecordsDetails(id) {
    return request({
        url: '/business/residents/receiptShipmentRecords/' + id,
        method: 'get',
    })
}
//上传头像 /business/residents/avatar   传文件,参数名:avatarfile
export function residentsAvatar(data) {
    return request({
        url: '/business/residents/avatar',
        method: 'post',
        data: data
    })
}
// 获取未读消息数量 get  /business/residents/unreadMessageCount
export function unreadMessageCount(data) {
    return request({
        url: '/business/residents/unreadMessageCount',
        method: 'get',
		data: data
    })
}
// 设置昵称    参数名:id：用户id，nickName
export function updateNickName(data) {
    return request({
        url: '/business/residents/updateNickName',
        method: 'post',
        data: data
    })
}
// 获取企业单位为收运公司和预处理厂的
export function selectUnitList(data) {
    return request({
        url: '/business/residents/selectUnitList',
        method: 'get',
        data: data
    })
}
// 获取已签约的企业单位
export function InSignUnitList(data) {
    return request({
        url: '/business/residents/InSignUnitList',
        method: 'get',
        data: data
    })
}
// 获取签约记录
export function myApplicationList(data) {
    return request({
        url: '/business/residents/myApplicationList',
        method: 'get',
        data: data
    })
}
// 修改记录
export function updateApplication(data) {
    return request({
        url: '/business/residents/updateApplication',
        method: 'post',
        data: data
    })
}
// 主账号提交收运申请后 其他用户再提交 提示
export function isCommitOrder(data) {
    return request({
        url: '/business/residents/isCommitOrder',
        method: 'get',
        data: data
    })
}

//获取平台配置
export function getPlatformConfig(data) {
	return request({
		url: `/system/config/list`,
		method: 'get',
		data: data,
	})
}